package com.dqyt.khjc.controller;

import com.dqyt.khjc.bean.ResultMsg;
import com.dqyt.khjc.service.SmsRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.xml.ws.soap.Addressing;

/**
 * 短信控制
 */
@RestController
public class SmsRecordController {

    @Autowired
    private SmsRecordService smsRecordService;

    /**
     * 发送短信
     * @param request
     * @param smapIds
     * @param smsContent
     * @param targetPhone
     * @return
     */
    @RequestMapping(value = "/api/sendSmsToCon", method = {RequestMethod.GET,RequestMethod.POST})
    public ResultMsg sendSmsToCon(HttpServletRequest request, String [] smapIds,String smsContent,String targetPhone) {
        ResultMsg resultMsg =smsRecordService.sendSmsToCon(request,smapIds, smsContent,targetPhone);
        return resultMsg;
    }

}
